package org.graduation.feignapi;

import org.graduation.model.common.ResponseResult;
import org.graduation.model.common.project.ProjectUserTable;
import org.graduation.model.common.project.Task;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("project-service")
public interface ProjectClient {
    @RequestMapping(value = "/info/{p_id}", method = RequestMethod.GET)
    ResponseResult info(@PathVariable(value = "p_id") Long p_id);

    @RequestMapping(value = "/project/phase/task/alarmTask", method = RequestMethod.GET)
    List<Task> alarmTask(@RequestParam(value = "uid") Integer uid);

    @GetMapping("/project/user/{pid}/exist/{uid}")
    ResponseResult<Boolean> exist(@PathVariable(value = "pid") Long pid, @PathVariable(value = "uid") Integer uid);

    @GetMapping("/project/user/list/user/{uid}")
    ResponseResult<List<ProjectUserTable>> listByUser(@PathVariable("uid") Integer uid);
}
